﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Core
{
    public class Log
    {
        protected String file;

        public Log(String file)
        {
            this.file = file;
            
        }

        public IEnumerable<Line> Lines
        {
            get
            {
                using (var reader = File.OpenText(file))
                {
                    String line; 
                    int lineCounter = 1;
                    while ((line = reader.ReadLine()) != null)
                        yield return new LineReader(line, lineCounter++).Read();
                }
            }
        }
    }
}
